<div class="modal " *ngIf="showSelf" tabindex="-1" role="dialog" name="create_task"
     aria-labelledby="gridSystemModalLabel">
    <div class="modal-dialog modal-lg" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-label="Close" (click)="close()">×</button>
                <h4 class="modal-title" *ngIf="readOnly">预案详情</h4>
                <h4 class="modal-title" *ngIf="example.id && !readOnly">编辑预案</h4>
                <h4 class="modal-title" *ngIf="!example.id && !readOnly">新增预案</h4>
            </div>
            <div class="modal-body">
                <div *ngIf="!readOnly">
                    <div class="row margin_b_10">
                        <div class="col-sm-1 pading_r_0 align_r">标题</div>
                        <div class="col-sm-5">
                            <div class="form-group ">
                                <input name="title" type="text" class="form-control"
                                       [(ngModel)]="example.title"/>
                            </div>
                        </div>
                    </div>
                    <div class="row margin_b_10">
                        <div class="col-sm-1 pading_r_0 align_r">内容</div>
                        <div class="col-sm-11">
                            <div class="form-group ">
                            <textarea name="content" type="text" class="form-control min_height_200"
                                      [(ngModel)]="example.content"></textarea>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="" *ngIf="readOnly">
                    <div class="row margin_b_10">
                        <div class="col-sm-1 pading_r_0 align_r">标题</div>
                        <div class="col-sm-11">
                            <div class="">{{example.title}}</div>
                        </div>
                    </div>
                    <div class="row margin_b_10">
                        <div class="col-sm-1 pading_r_0 align_r">内容</div>
                        <div class="col-sm-11">
                            <div class="min_height_50">{{example.content}}</div>
                        </div>
                    </div>
                    <div class="row margin_b_10">
                        <div class="col-sm-1 pading_r_0 align_r">创建者</div>
                        <div class="col-sm-11">
                            <div class=" ">{{example.creator ? example.creator.realName:''}}</div>
                        </div>
                    </div>
                    <div class="row margin_b_10">
                        <div class="col-sm-1 pading_r_0 align_r">创建时间</div>
                        <div class="col-sm-11">
                            <div class=" ">{{example.createAt | date: 'yyyy-MM-dd HH:mm'}}</div>
                        </div>
                    </div>
                    <div class="row margin_b_10">
                        <div class="col-sm-1 pading_r_0 align_r">更新者</div>
                        <div class="col-sm-11">
                            <div class=" ">{{example.updater ? example.updater.realName:''}}</div>
                        </div>
                    </div>
                    <div class="row margin_b_10">
                        <div class="col-sm-1 pading_r_0 align_r">更新时间</div>
                        <div class="col-sm-11">
                            <div class=" ">{{example.updateAt | date: 'yyyy-MM-dd HH:mm'}}</div>
                        </div>
                    </div>
                </div>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn model_btn" data-dismiss="modal" (click)="hide()">返回</button>
                <button *ngIf="!readOnly" type="button" class="btn model_btn" (click)="saveExample()">确定</button>
            </div>
        </div>
    </div>
</div>
